<template>
  <div class="node-status flex items-center">
    <i-icons-warning></i-icons-warning>
    <span class="text-[12px] text-[#2D2E33] mx-1">{{ config.name }}</span>
  </div>
</template>

<script setup lang="ts">
interface IProps {
  status: number
}

const props = defineProps<IProps>()

const map = {
  1: { name: '运行', icon: 'running-filled', color: '#00B324' },
  2: { name: '停止', icon: 'stop-filled', color: '#8A8E9A' },
  3: { name: '异常', icon: 'info-circle-filled', color: '#FF6805' },
  4: { name: '离线', icon: 'ban-filled', color: '#F53F3F' }
}

const config = computed(() => {
  return map[props.status] || { name: '-', icon: '', color: '' }
})
</script>

<style scoped lang="less"></style>
